Placer
A Placer determines at what height a structure spawns. It consists of multiple factors, all of which must be fulfilled to successfully place the structure. At the same time, a factor sets placement priorities, and the final position will be chosen randomly taking those priorities into account. These factors can also be weighted to be taken into account more or less than others (priority). Simple example Placer with 3 factors: # 'The structure must spawn under y=128' # 'Everything under the surface is strongly preferred' # 'The structure must spawn over y=30' The structure will then be placed at a random spot between 30 and 128, and if a surface is found, the chance for spawning below it will be a lot higher. Each structure also contains a 'baseline' which determines where the 'floor level' of the structure is. If your structure has a basement of, for example, 10 blocks height, the 'baseline' would be set to 10. Factors Limit The limit factor works by casting rays along the surface of where the structure will be placed. The rays move along the height and mark the passed terrain as fit or unfit for the structure to spawn. Example: 'The structure must spawn under y=128' # Dynamic Position (Bedrock) with weight ''ignore'' # Move 128 with weight 1 So - the limit factor first moves to bedrock and doesn't mark anything that it passes. Then it moves up 128 blocks, marking everything that it passes with weight 1 (i.e. 'accept this terrain to spawn'). Everything not marked specifically will be interpreted as unfit. Note that a 'Mark' ray is actually just a 'Move' ray with an acceptance factor > 0. Match The match factor tests the terrain inside the structure for a Block Expression. The better it matches for the contents, the more priority is given to the placement height. Examples Surface # Dynamic Position: World Height #* Move to y=256 # Average Surface #* Move downwards until a surface is found # Mark 0 #* Mark the current position as spawnable This Placer will place your structure on the first surface from the sky downwards. This is probably the most common technique. If your structure contains a basement, set the baseline to where your floor height is. Sky # Dynamic Position: Bedrock #* Move to y=0 # Move 128 #* Move up 128 blocks # Mark 60 #* Move up 60 blocks and mark terrain with weight=1 This Placer will place your structure between y=60 and y=128 (it will stick out towards the top, as the marked terrain indicates the bottom of the structure. Underground # Dynamic Position: World Height #* Move to y=256 # Average Surface #* Move downwards until a surface is found # Dynamic Move Downwards: Structure Height #* Move downwards by the height of the structure # Mark Dynamic Position: Bedrock #* Move to y=0, marking all blocks in between as spawnable This Placer will place your structure between the surface and bedrock, so that it will always be covered by dirt.Category:Information Category:Advanced